home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / libs / tsipp / tsipp.lha / tsipp3.0a / demos / conetest.tcl < prev    next >
Encoding:
Text File  |  1992-11-02  |  1.3 KB  |  46 lines

  1. #==============================================================================
  2. #                                conetest.tcl
  3. #------------------------------------------------------------------------------
  4. # A port of SIPP demo program conetest.c to Tcl-SIPP.
  5. #------------------------------------------------------------------------------
  6. # $Id: conetest.tcl,v 2.0 1992/11/02 03:55:22 markd Rel $
  7. #------------------------------------------------------------------------------
  8.  
  9. source util.tcl
  10. ParseArgs
  11.  
  12. set RESOLUTION 20
  13.  
  14. SippLightSourceCreate { 1.0  1.0 1.0} {0.9 0.9 0.9} DIRECTION
  15. SippLightSourceCreate {-1.0 -1.0 0.5} {0.4 0.4 0.4} DIRECTION
  16.  
  17. #
  18. # light salmon
  19. #
  20. set shader [SippShaderBasic 0.5 0.6 0.2 {1.0000 0.6275 0.4784}]
  21.  
  22. #
  23. # The ordinary cone
  24. #
  25. set cone [SippCone 1.0 0.0 4.0 $RESOLUTION $shader WORLD]
  26.  
  27. SippObjectMove $cone {-3.0 0.0 0.0}
  28. SippObjectAddSubobj WORLD $cone
  29.  
  30. #
  31. # The truncated cone
  32. #
  33. set trunc_cone [SippCone 1.0 0.4 5.0 $RESOLUTION $shader WORLD]
  34. SippObjectMove $trunc_cone {3.0 0.0 0.0}
  35. SippObjectAddSubobj WORLD $trunc_cone
  36.  
  37. #
  38. # The cylinder (a trucated cone with equal top and bottom radii
  39. #
  40. set cylinder [SippCylinder 1.0 3.0 $RESOLUTION $shader WORLD]
  41. SippObjectAddSubobj WORLD $cylinder
  42.  
  43. SippCameraParams STDCAMERA {5.0 -10.0 6.0} {0.0 0.0 0.0} {0.0 0.0 1.0} 0.4
  44.  
  45. DoRendering "cone"
  46.